if (window.plus) {
    ready();
} else {
    document.addEventListener('plusready', ready, false);
}

$(function () {
    if (AGENT_CLIENT.WEB) {
        ready();
    }
})

function ready() {
    var thisPage = null;
    var redPackagePage = function () {
        this.init();
    };

    redPackagePage.prototype = {
        init: function () {
            if (os.wechat) {
                $(".header").hide();
            }
            this.bindEvent();
        },
        bindEvent: function () {
            $("#goRegister").on("click", function () {
                var memberid = getUrlParam('memberid');
                var redirectUrl = "../account/register.html";
                if (memberid) {
                    redirectUrl += "?memberid=" + memberid;
                }
                redirect(redirectUrl);
            });
        }
    };

    thisPage = new redPackagePage();
}
